package com.ngmaster.apiserver.common;

/**
 * Response返回值code及信息定义
 *
 */
public enum ResponseStatus {

	/**
	 * 操作成功
	 */
	SUCCESS(0,"命令下发成功"),
	/**
	 * 未登录
	 */
	NOT_LOGGED(-2,"用户未登录"),
	/**
	 * 没有权限
	 */
	NO_LIMIT(-3,"权限不足"),
	/**
	 * 系统异常
	 */
	SYS_ERROR(-1,"系统异常"),
	/**
	 * 业务异常
	 */
	BUSINESS_ERROR(1,"操作失败"),

	DEVICE_OFFLINE(404, "设备离线或者不存在"),

	;

	private int code;
	private String msg;

	ResponseStatus(int code, String msg) {
		this.code=code;
		this.msg=msg;
	}

	public int getCode(){
		return this.code;
	}
	public String getMsg(){
		return this.msg;
	}
}